@extends('layouts.admin')

@section('content')
    <div class="console-title">
        <h2>系统设置->微信设置</h2>
    </div>
    <div class="content-div">
        <form method="post" id="Form" action="{{admin_url('settings/save')}}">
            {{csrf_field()}}
            <table class="formtable" border="0" cellpadding="0" cellspacing="0" width="100%">
                <tbody>
                <tr>
                    <td width="110" class="cell-label">公众号APPID:</td>
                    <td width="360" class="cell-input">
                        <div class="input-group">
                            <input class="form-control" type="text" title="" name="settings[wx_appid]" value="{{$settings['wx_appid'] or ''}}">
                        </div>
                    </td>
                    <td class="cell-tips">微信公众号appID</td>
                </tr>
                <tr>
                    <td class="cell-label">公众号APPSECRET:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <input class="form-control" type="text" title="" name="settings[wx_secret]" value="{{$settings['wx_secret'] or ''}}">
                        </div>
                    </td>
                    <td class="cell-tips">微信公众号appSecret</td>
                </tr>
                <tr>
                    <td class="cell-label">微信支付商户号:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <input class="form-control" type="text" title="" name="settings[wx_mch_id]" value="{{$settings['wx_mch_id'] or ''}}">
                        </div>
                    </td>
                    <td class="cell-tips">微信支付商户ID</td>
                </tr>
                <tr>
                    <td class="cell-label">微信支付API安全秘钥:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <input title="" name="settings[wx_mch_key]" value="{{$settings['wx_mch_key'] or ''}}" class="form-control w300" type="text">
                        </div>
                    </td>
                    <td class="cell-tips">微信支付API安全秘钥，不超过32位</td>
                </tr>
                <tr>
                    <td class="cell-label">被关注自动回复:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <div class="input-group-btn">
                                <label><input type="radio" name="settings[wx_subscribe_msgtype]" value="1"@if (isset($settings['wx_subscribe_msgtype']) && $settings['wx_subscribe_msgtype']==1) checked="checked"@endif> 文字消息</label>
                                <label><input type="radio" name="settings[wx_subscribe_msgtype]" value="2"@if (isset($settings['wx_subscribe_msgtype']) && $settings['wx_subscribe_msgtype']==2) checked="checked"@endif> 图文消息</label>
                            </div>
                        </div>
                    </td>
                    <td class="cell-tips">自动回复</td>
                </tr>
                <tr>
                    <td class="cell-label">被关注文字内容:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <textarea class="form-control" title="" name="settings[wx_subscribe_message]">{{$settings['wx_subscribe_message'] or ''}}</textarea>
                        </div>
                    </td>
                    <td class="cell-tips">公众号被关注时自动回复的文字内容</td>
                </tr>
                <tr>
                    <td class="cell-label">被关注图文消息:</td>
                    <td class="cell-input">
                        <div class="input-group">
                            <input class="form-control w300" type="text" title="" name="settings[wx_subscribe_media_id]" value="{{$settings['wx_subscribe_media_id'] or ''}}">
                        </div>
                    </td>
                    <td class="cell-tips">公众号被关注时自动回复的图文消息,请填写素材的media_id</td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <td></td>
                    <td colspan="2">
                        <button type="submit" class="btn btn-primary w100">更新配置</button>
                    </td>
                </tr>
                </tfoot>
            </table>
        </form>
    </div>
@stop
